package 工厂模式

import "fmt"

type fooooooooooooooooo interface {
	fooooooooooooooooooooooooooooooo()
}

type lovely interface {
	foo()	
}

type dog struct {

}

func (d *dog)fooooooooooooooooooooooooooooooo(){
	// do nothing
}

func (d *dog)foo()  {
	fmt.Println("Bark!")
}

type cat struct {

}

func (d *cat)foo()  {
	fmt.Println("Wew~")
}

type picker interface {
	pick(string) lovely
}

type petHouse struct {

}

func (ph *petHouse)pick(c string)lovely  {
	switch c {
	case "cat":
		return  &cat{}
	case "dog":
		return &dog{}
	}
	return nil
}
